#coding=utf-8
__author__ = 'rsg'

from forms.forms import myForm, LoginForm
from database.connecting import Get_DBSession
from database.models import User


def query_test():

    with Get_DBSession() as session:
        users = session.query(User).group_by(User.name).all()
    return users

users = query_test()

user_names = []

for element in users:
    user_names.append(element.name)

for i in user_names:
    print i

